﻿#define _CRT_SECURE_NO_WARNINGS  1
#include"SLT.h"

void Test01()
{
	SLN* phead = NULL;
	SLNFrontPush(&phead, 1);
	SLNFrontPush(&phead, 2);
	SLNFrontPush(&phead, 3);
	SLNFrontPush(&phead, 4);
	SLNFrontPush(&phead, 5);
	SLNBackPush(&phead, 1);
	SLNBackPush(&phead, 2);
	SLNBackPush(&phead, 3);
	SLNBackPush(&phead, 4);
	SLNBackPush(&phead, 5);
	SLNFrontPop(&phead);
	SLNFrontPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNBackPop(&phead);
	SLNPrint02(phead);
}

//测试尾插的两种方式
void Test02()
{
	SLN* phead = NULL;
	SLNBackPush(&phead, 1);
	SLNBackPush(&phead, 2);
	SLNBackPush(&phead, 3);
	SLNBackPush(&phead, 4);
	SLNBackPush(&phead, 5);
	SLNPrint02(phead);
	SLNBackPush01(phead, 9);
	SLNErase(&phead, SLNFind(phead, 1));
	SLNPrint02(phead);

	SLNErase(&phead, SLNFind(phead, 9));
	SLNPrint02(phead);

	SLNErase(&phead, SLNFind(phead, 3));
	SLNPrint02(phead);

	SLNEraseAfter(SLNFind(phead, 2));
	SLNPrint02(phead);

	SLNInsert(&phead,SLNFind(phead, 5),100);
	SLNPrint02(phead);

	SLNInsertAfetr(SLNFind(phead, 2),100);
	SLNPrint02(phead);

	SLNDestroy02(&phead);

}

//int main()
//{
//	//Test01();
//	//Test02();
//
//
//	return 0;
//}
​
#include<stdio.h>

int main()
{
	float a = 0;
	scanf("%f", &a);

	if (a < 0)
		printf("Invalid Value!");//注意感叹号
	else if (a <= 50)
		printf("cost = %.2f", 0.53 * a);
	else
	{
		a = (a - 50) * 0.58 + 0.53 * 50;
		printf("cost = %.2f", a);
	}

	return 0;
}

​
